<template>
  <div class="project-detail">
    <div class="header">
      <nav-header :is-bgc="true"></nav-header>
    </div>
    <div class="container">
      <div class="breadcrumb">
        <el-breadcrumb :separator="'>'">
          <el-breadcrumb-item :to="{ path: '/' }">Home</el-breadcrumb-item>
          <el-breadcrumb-item>Protfolio</el-breadcrumb-item>
          <el-breadcrumb-item>Details</el-breadcrumb-item>
        </el-breadcrumb>
      </div>
      <div class="title-wrapper">
        <h2 class="title">
          <span class="title-span">Finance</span>
          <!-- Real-time system for efficient parallel processing -->
          {{ currentProject.name }}
        </h2>
        <div class="subtitle">Roadshow time: {{ currentProject.roadTime }}</div>
      </div>

      <div class="btn-wrapper">
        <button>To sign up</button>
        <button class="collect-btn">
          Collect
          <img src="@/assets/img/protfolio/collect-icon.png" alt="" />
        </button>
      </div>

      <div class="banner-wrapper">
        <el-carousel
          :interval="5000"
          arrow="always"
          height="759px"
          class="carousel"
        >
          <el-carousel-item v-for="item in 4" :key="item">
            <!-- <h3>{{ item }}</h3> -->
            <img src="@/assets/img/protfolio/图@2x.png" alt="" />
          </el-carousel-item>
        </el-carousel>
      </div>

      <div class="investment-wrapper">
        <p class="opt">
          <el-icon class="opt-icon"><suitcase /></el-icon>
          Industry: <span class="opt-sub">{{ currentProject.industry }}</span>
        </p>
        <p class="opt">
          <el-icon class="opt-icon"><promotion /></el-icon>

          Stage:
          <span class="opt-sub"> {{ currentProject.stage }}</span>
        </p>
        <p class="opt">
          <el-icon class="opt-icon"><goblet /></el-icon>

          Location:
          <span class="opt-sub">{{ currentProject.location }}</span>
        </p>
        <p class="opt">
          <el-icon class="opt-icon"><wallet-filled /></el-icon>
          Financing method:
          <span class="opt-sub"
            >{{ currentProject.fmethod }} ($
            {{ currentProject.financeAmount }}
            million)</span
          >
        </p>
        <p class="opt">
          <el-icon class="opt-icon"><map-location /></el-icon>
          <span class="opt-only">Looking for:</span>
          <span class="opt-sub">
            venture capital, individual investors, angel investors,debt
            investment institutions, etc
          </span>
        </p>
      </div>

      <div class="bottom-wrapper">
        <div class="introduction">
          <h2>Introduction</h2>
          <div class="line"></div>
          <p>
            For traders who love technical analysis, robust charting tools are
            essential. TradingView is one option for both amateur and
            experienced traders. it offers numerous trading and charting tools
            and also a free membership option. let's face it... not everyone has
            the money or need for a Bloomborg terminal subscription. The Stacks
            series of products: Stacks: Landing Page kit, Stacks: Portfolio Kit,
            Stacks eCommerce Kit. "Stacks is a production-ready library of
            stackable content blocks built in React Native. Mix-and-match dozens
            of responsive elements to quickly configure your favorite landing
            page layouts or hit the ground running with 10 pre-built templates,
            all in light or dark mode."
          </p>
        </div>
        <div class="introduction">
          <h2>What does TradingView do?</h2>
          <div class="line"></div>
          <p>
            The Stacks series of products: Stacks: Landing Page Kit, Stacks:
            Portfolio Kit, Stacks: eCommerce Kit. "Stacks is a production-ready
            library of stackable content blocks built in React Native.
            Mix-and-match dozens of responsive elements to quickly configure
            your favorite landing page layouts or hit the ground running with 10
            pre-built templates, all in light or dark mode."
          </p>
        </div>
      </div>
      <div class="contact-container">
        <img src="~@/assets/img/protfolio/Contact-icon@2x.png" alt="" />
        <span>Contact</span>
      </div>
    </div>
    <im-footer></im-footer>
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { useStore } from '@/store'

import { NavHeader } from '@/components/nav-header'
import ImFooter from '@/components/im-footer'

const props = withDefaults(defineProps<{ id: string }>(), {
  id: '',
})
const store = useStore()

store.dispatch('user/getProjectByIdAction', { id: props.id })

const currentProject = computed(() => store.state.user.currentProject.investors)
</script>

<style scoped lang="less">
.contact-container {
  width: 110px;
  height: 110px;
  box-sizing: border-box;
  padding-top: 23px;
  padding-bottom: 18px;
  background: #6d7382;
  border-radius: 10px;
  position: absolute;
  right: -100px;
  top: 350px;
  font-size: 20px;
  text-align: center;
  color: #fff;
  img {
    width: 40px;
    height: 33px;
  }
}

@media screen and(max-width: 1700px) {
  .contact-container {
    right: -5px;
    width: 60px;
    padding: 0;
    padding-top: 10px;
    height: 60px;
    transition: all 0.3s ease-in-out;

    img {
      width: 30px;
      height: 30px;
    }
    span {
      display: none;
    }
  }

  .contact-container:hover {
    width: 110px;
    height: 110px;
    padding-top: 23px;
    padding-bottom: 18px;
    span {
      display: block;
    }
    img {
      width: 40px;
      height: 33px;
    }
  }
}
.container {
  padding: 0 55px;
  position: relative;
}
.project-detail {
  width: 100%;
  background: linear-gradient(210deg, #342e38 0%, #1c1c24 48%, #0c1017 100%);

  .breadcrumb {
    margin-top: 30px;
    font-size: 22px;
    font-family: SF Pro Text;
    font-weight: 400;
    line-height: 35px;
    color: #ffffff;
    opacity: 1;
  }

  .title-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    color: #fff;
    .title {
      span {
        display: inline-block;
        text-align: center;
        width: 108px;
        height: 42px;
        line-height: 42px;
        background: #3772ff;
        border-radius: 3px 15px 3px 15px;
        font-size: 22px;
        font-weight: 400;
      }
      font-size: 40px;
      font-family: SF Pro Text;
      font-weight: 500;
      vertical-align: middle;
    }
    .subtitle {
      width: 100%;
      text-align: center;
      font-size: 18px;
      font-family: SF Pro Text;
      font-weight: 400;
      color: #6d7382;
    }
  }

  .btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 34px;
    margin-bottom: 58px;
    button {
      width: 204px;
      height: 70px;
      line-height: 70px;
      background: #3772ff;
      border-radius: 50px;
      outline: none;
      border: none;
      font-size: 20px;
      font-family: SF Pro Display;
      font-weight: 500;
      color: #fff;
      border: 1px solid transparent;
    }
    .collect-btn {
      border: 1px solid #707070;
      color: #707070;
      background-color: #1f1e26;
      margin-left: 30px;
      img {
        width: 33px;
        height: 33px;
      }
    }
  }

  .banner-wrapper {
    width: 100%;
    // height: 759px;

    .carousel {
      img {
        width: 100%;
        height: 100%;
      }
    }
  }

  .investment-wrapper {
    height: 316px;
    background: #1c1c24;
    border-radius: 20px;
    margin-top: 75px;
    box-sizing: border-box;
    padding-top: 36px;
    padding-bottom: 49px;
    padding-left: 72px;

    .opt {
      font-size: 20px;
      line-height: 36px;
      color: #707070;
      .opt-icon {
        margin-right: 16px;
      }
    }
  }

  .bottom-wrapper {
    .introduction {
      margin-top: 69px;
      h2 {
        font-size: 50px;
        font-family: SF Pro Text;
        font-weight: 600;
        color: #fff;
      }
      .line {
        width: 163px;
        height: 1px;
        background-color: #707070;
        opacity: 0.6;
        margin-top: 38px;
        margin-bottom: 48px;
      }
      p {
        font-size: 22px;
        font-family: SF Pro Text;
        font-weight: 400;
        color: #6d7382;
        line-height: 40px;
      }
    }
  }
}

@media screen and (max-width: 768px) {
  .project-detail {
    background: #000;
  }
  .header {
    height: 61px;
  }
  .container {
    padding: 0 16px;
    background-color: #000;
  }
  .project-detail .breadcrumb {
    display: none;
  }
  .contact-container {
    display: none;
  }

  .project-detail .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    .banner-wrapper {
      order: 0;
      margin-top: 19px;
    }
    .investment-wrapper {
      margin-top: 0;
      padding-top: 16px;
      padding-bottom: 0px;
      height: auto;
      &::before {
        content: '';
        display: block;
        height: 1px;
        background-color: rgba(112, 112, 112, 0.3);
        margin-bottom: 20px;
      }
      &::after {
        margin-top: 30px;
        content: '';
        display: block;
        height: 1px;
        background-color: rgba(112, 112, 112, 0.3);
      }
    }
    .title-wrapper {
      order: 1;
      // margin-top: 24px;
      h2 {
        display: flex;
        flex-wrap: wrap;
        font-size: 24px;
        .title-span {
          margin: 24px 0 14px 0;
          background: #1e1f25;
          color: #3772ff;
          // font-size: 12px;
        }
      }
      .subtitle {
        text-align: left;
        font-size: 15px;
      }
    }

    .investment-wrapper {
      background-color: #000;
      order: 2;
      line-height: 30px;
      padding-left: 0px;
      p {
        margin-bottom: 0px;
        font-size: 14px;
        .opt-icon {
          margin-right: 9px;
        }
        .opt-only {
          margin-left: 5px;
        }
        .opt-sub {
          // display: inline-block;
          float: right;
        }
      }
      p:last-child {
        display: flex;
        align-items: baseline;

        .opt-sub {
          text-align: right;
          flex: 1;
          height: 60px;
          overflow-y: hidden;
        }
      }
    }

    .bottom-wrapper {
      order: 3;
      .introduction {
        margin-top: 0px;
        h2 {
          font-size: 24px;
          margin: 23px 0 19px 0;
        }
        .line {
          margin: 0 0 20px 0;
        }
        p {
          font-size: 18px;
          line-height: 30px;
        }
      }
    }
    .btn-wrapper {
      display: flex;
      justify-content: space-evenly;
      position: fixed;
      bottom: 0;
      width: 100%;
      height: 71px;
      padding: 17px 0;
      box-sizing: border-box;
      background-color: #1c1c24;
      margin: 0;
      z-index: 2;
      button:last-child {
        order: -1;
        border: 2px solid #3772ff;
        color: #3772ff;
      }
      button {
        width: 120px;
        height: 38px;
        line-height: 38px;
        margin: 0;
        font-size: 16px;

        img {
          display: none;
        }
      }
    }
  }

  .project-detail .banner-wrapper {
    width: 100%;
    // height: 759px;
    // background-color: #bfa;
    :deep(.el-carousel__container) {
      height: 211px !important;
    }
    .carousel {
      img {
        height: 211px;
      }
    }
  }
}
</style>
